home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / m_to_r / pprev101 / test.dfm / test.txt < prev   
Encoding:
Text File  |  1996-09-15  |  17.3 KB  |  676 lines

  1. object TestForm: TTestForm
  2.   Left = 295
  3.   Top = 180
  4.   BorderIcons = [biSystemMenu, biMinimize]
  5.   BorderStyle = bsSingle
  6.   Caption = 'Print Preview Test'
  7.   ClientHeight = 309
  8.   ClientWidth = 362
  9.   Font.Color = clBlack
  10.   Font.Height = -13
  11.   Font.Name = 'Arial'
  12.   Font.Style = []
  13.   Menu = MainMenu1
  14.   PixelsPerInch = 96
  15.   Position = poScreenCenter
  16.   TextHeight = 16
  17.   object TabbedNotebook1: TTabbedNotebook
  18.     Left = 0
  19.     Top = 0
  20.     Width = 362
  21.     Height = 309
  22.     Align = alClient
  23.     TabsPerRow = 4
  24.     TabFont.Color = clBtnText
  25.     TabFont.Height = -11
  26.     TabFont.Name = 'MS Sans Serif'
  27.     TabFont.Style = []
  28.     TabOrder = 0
  29.     object TTabPage
  30.       Left = 5
  31.       Top = 26
  32.       Caption = '&Text'
  33.       object Font1But: TButton
  34.         Left = 35
  35.         Top = 156
  36.         Width = 105
  37.         Height = 33
  38.         Caption = '&Font'
  39.         TabOrder = 0
  40.         OnClick = Font1ButClick
  41.       end
  42.       object Preview1But: TButton
  43.         Left = 124
  44.         Top = 238
  45.         Width = 105
  46.         Height = 33
  47.         Caption = 'Print Pre&view'
  48.         Default = True
  49.         TabOrder = 2
  50.         OnClick = Preview1ButClick
  51.       end
  52.       object GroupBox1: TGroupBox
  53.         Left = 176
  54.         Top = 120
  55.         Width = 161
  56.         Height = 105
  57.         Caption = 'Margins (inches)'
  58.         TabOrder = 1
  59.         object Label6: TLabel
  60.           Left = 24
  61.           Top = 19
  62.           Width = 21
  63.           Height = 16
  64.           Caption = 'Left'
  65.         end
  66.         object Label7: TLabel
  67.           Left = 24
  68.           Top = 59
  69.           Width = 21
  70.           Height = 16
  71.           Caption = 'Top'
  72.         end
  73.         object Label8: TLabel
  74.           Left = 96
  75.           Top = 19
  76.           Width = 30
  77.           Height = 16
  78.           Caption = 'Right'
  79.         end
  80.         object Label9: TLabel
  81.           Left = 96
  82.           Top = 59
  83.           Width = 42
  84.           Height = 16
  85.           Caption = 'Bottom'
  86.         end
  87.         object LeftMar: TMaskEdit
  88.           Left = 24
  89.           Top = 35
  90.           Width = 40
  91.           Height = 20
  92.           EditMask = '0.0;1;_'
  93.           MaxLength = 3
  94.           TabOrder = 0
  95.           Text = '1.0'
  96.         end
  97.         object RightMar: TMaskEdit
  98.           Left = 96
  99.           Top = 35
  100.           Width = 40
  101.           Height = 20
  102.           EditMask = '0.0;1;_'
  103.           MaxLength = 3
  104.           TabOrder = 1
  105.           Text = '1.0'
  106.         end
  107.         object TopMar: TMaskEdit
  108.           Left = 24
  109.           Top = 75
  110.           Width = 40
  111.           Height = 20
  112.           EditMask = '0.0;1;_'
  113.           MaxLength = 3
  114.           TabOrder = 2
  115.           Text = '1.0'
  116.         end
  117.         object BotMar: TMaskEdit
  118.           Left = 96
  119.           Top = 75
  120.           Width = 40
  121.           Height = 20
  122.           EditMask = '0.0;1;_'
  123.           MaxLength = 3
  124.           TabOrder = 3
  125.           Text = '1.0'
  126.         end
  127.       end
  128.       object Memo1: TMemo
  129.         Left = 16
  130.         Top = 8
  131.         Width = 321
  132.         Height = 113
  133.         BorderStyle = bsNone
  134.         Color = clBtnFace
  135.         Ctl3D = False
  136.         Lines.Strings = (
  137.           'This example shows how to display lines of text on '
  138.           'one page.  The Grid is turned on by default in Print '
  139.           'Preview. Select the "Font" button to change which font '
  140.           'is used, or change the margins.  Note that due to '
  141.           'differences between screen & printer fonts, the margins '
  142.           'may appear different on screen.  Print the page to verify '
  143.           'the margins are correct.')
  144.         ParentCtl3D = False
  145.         TabOrder = 3
  146.       end
  147.     end
  148.     object TTabPage
  149.       Left = 5
  150.       Top = 26
  151.       Caption = 'Ta&ble'
  152.       object Label2: TLabel
  153.         Left = 71
  154.         Top = 128
  155.         Width = 51
  156.         Height = 16
  157.         Caption = 'Columns'
  158.       end
  159.       object Label3: TLabel
  160.         Left = 199
  161.         Top = 128
  162.         Width = 32
  163.         Height = 16
  164.         Caption = 'Rows'
  165.       end
  166.       object Label4: TLabel
  167.         Left = 19
  168.         Top = 32
  169.         Width = 313
  170.         Height = 65
  171.         AutoSize = False
  172.         Caption = 
  173.           'This example shows how to draw a table with text and numbers in ' +
  174.           'the table.  Zoom in to see that the outside border is thicker th' +
  175.           'an the inside lines. You may also change the printer orientation' +
  176.           '.'
  177.         WordWrap = True
  178.       end
  179.       object NumColEdit: TMaskEdit
  180.         Left = 135
  181.         Top = 124
  182.         Width = 33
  183.         Height = 20
  184.         EditMask = '0;1;_'
  185.         MaxLength = 1
  186.         TabOrder = 0
  187.         Text = '6'
  188.       end
  189.       object NumRowEdit: TMaskEdit
  190.         Left = 247
  191.         Top = 124
  192.         Width = 33
  193.         Height = 20
  194.         EditMask = '00;1;_'
  195.         MaxLength = 2
  196.         TabOrder = 1
  197.         Text = '25'
  198.       end
  199.       object Preview2But: TButton
  200.         Left = 124
  201.         Top = 238
  202.         Width = 105
  203.         Height = 33
  204.         Caption = 'Print Preview'
  205.         Default = True
  206.         TabOrder = 4
  207.         OnClick = Preview2ButClick
  208.       end
  209.       object PortraitBut: TRadioButton
  210.         Left = 93
  211.         Top = 176
  212.         Width = 73
  213.         Height = 17
  214.         Caption = 'Portrait'
  215.         TabOrder = 2
  216.       end
  217.       object LandscapeBut: TRadioButton
  218.         Left = 173
  219.         Top = 176
  220.         Width = 86
  221.         Height = 17
  222.         Caption = 'Landscape'
  223.         Checked = True
  224.         TabOrder = 3
  225.         TabStop = True
  226.       end
  227.     end
  228.     object TTabPage
  229.       Left = 5
  230.       Top = 26
  231.       Caption = '&Graphics'
  232.       object Label5: TLabel
  233.         Left = 16
  234.         Top = 16
  235.         Width = 321
  236.         Height = 49
  237.         AutoSize = False
  238.         Caption = 
  239.           'This example shows the use of bitmap graphics with the Print Pre' +
  240.           'view component.  The image is streched to various sizes.  You ma' +
  241.           'y also load another bitmap.'
  242.         WordWrap = True
  243.       end
  244.       object Preview3But: TButton
  245.         Left = 124
  246.         Top = 238
  247.         Width = 105
  248.         Height = 33
  249.         Caption = 'Print Pre&view'
  250.         Default = True
  251.         TabOrder = 0
  252.         OnClick = Preview3ButClick
  253.       end
  254.       object Panel1: TPanel
  255.         Left = 16
  256.         Top = 112
  257.         Width = 321
  258.         Height = 113
  259.         BevelInner = bvLowered
  260.         BorderWidth = 2
  261.         TabOrder = 1
  262.         object ScrollBox1: TScrollBox
  263.           Left = 4
  264.           Top = 4
  265.           Width = 313
  266.           Height = 105
  267.           Align = alClient
  268.           BorderStyle = bsNone
  269.           TabOrder = 0
  270.           object Image1: TImage
  271.             Left = 0
  272.             Top = 0
  273.             Width = 266
  274.             Height = 200
  275.             AutoSize = True
  276.             Picture.Data = {<image000.bmp>}
  277.           end
  278.         end
  279.       end
  280.       object Button3: TButton
  281.         Left = 16
  282.         Top = 72
  283.         Width = 105
  284.         Height = 33
  285.         Caption = '&Load Bitmap...'
  286.         TabOrder = 2
  287.         OnClick = Button3Click
  288.       end
  289.     end
  290.     object TTabPage
  291.       Left = 5
  292.       Top = 26
  293.       Caption = '&Multi-Page'
  294.       object Label1: TLabel
  295.         Left = 16
  296.         Top = 16
  297.         Width = 321
  298.         Height = 65
  299.         AutoSize = False
  300.         Caption = 
  301.           'The folowing example demonstrates Multi-Page documents. Look at ' +
  302.           'the source code for inheriting from the pagination object and ex' +
  303.           'tending it. Press the "Load Text" button to load your own ASCII ' +
  304.           'file.'
  305.         WordWrap = True
  306.       end
  307.       object Label10: TLabel
  308.         Left = 224
  309.         Top = 112
  310.         Width = 66
  311.         Height = 16
  312.         Caption = 'Start Page:'
  313.       end
  314.       object Preview4But: TButton
  315.         Left = 124
  316.         Top = 238
  317.         Width = 105
  318.         Height = 33
  319.         Caption = 'Print Pre&view'
  320.         Default = True
  321.         TabOrder = 4
  322.         OnClick = Preview4ButClick
  323.       end
  324.       object FileMemo: TMemo
  325.         Left = 16
  326.         Top = 136
  327.         Width = 321
  328.         Height = 92
  329.         Font.Color = clBlack
  330.         Font.Height = -11
  331.         Font.Name = 'Courier New'
  332.         Font.Style = []
  333.         Lines.Strings = (
  334.           'unit Debug;'
  335.           ''
  336.           'interface'
  337.           ''
  338.           'uses'
  339.           
  340.             '  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Con' +
  341.             'trols,'
  342.           '  Forms, Dialogs, StdCtrls, Menus;'
  343.           ''
  344.           'type'
  345.           '  TDebugForm = class(TForm)'
  346.           '    Memo1: TMemo;'
  347.           '    MainMenu1: TMainMenu;'
  348.           '    File1: TMenuItem;'
  349.           '    StayOnTop1: TMenuItem;'
  350.           '    N1: TMenuItem;'
  351.           '    Exit1: TMenuItem;'
  352.           '    Clear1: TMenuItem;'
  353.           '    Font1: TMenuItem;'
  354.           '    N2: TMenuItem;'
  355.           '    FontDialog1: TFontDialog;'
  356.           '    procedure FormCreate(Sender: TObject);'
  357.           '    procedure Exit1Click(Sender: TObject);'
  358.           '    procedure StayOnTop1Click(Sender: TObject);'
  359.           '    procedure Clear1Click(Sender: TObject);'
  360.           '    procedure Font1Click(Sender: TObject);'
  361.           '  private'
  362.           '    { Private declarations }'
  363.           '  public'
  364.           '    { Public declarations }'
  365.           '    procedure AddLine(s: string);'
  366.           '  end;'
  367.           ''
  368.           '   procedure TRACE(s: string);'
  369.           '   procedure TRACE1(s: string; i : integer);'
  370.           '   procedure ASSERT(b: boolean);'
  371.           ''
  372.           'var'
  373.           '  DebugForm: TDebugForm;'
  374.           ''
  375.           'implementation'
  376.           ''
  377.           '{$R *.DFM}'
  378.           ''
  379.           'const'
  380.           '   MaxLines = 500;'
  381.           ''
  382.           '{$IFDEF DEBUG}'
  383.           'procedure TRACE(s: string);'
  384.           'begin'
  385.           '   DebugForm.AddLine(s);'
  386.           'end;'
  387.           '{$ELSE}'
  388.           'procedure TRACE(s: string);'
  389.           'begin'
  390.           'end;'
  391.           '{$ENDIF}'
  392.           ''
  393.           '{$IFDEF DEBUG}'
  394.           'procedure TRACE1(s: string; i : integer);'
  395.           'begin'
  396.           '   TRACE(s + '#39' '#39' +IntToStr(i));'
  397.           'end;'
  398.           '{$ELSE}'
  399.           'procedure TRACE1(s: string; i : integer);'
  400.           'begin'
  401.           'end;'
  402.           '{$ENDIF}'
  403.           ''
  404.           '{$IFDEF DEBUG}'
  405.           'procedure ASSERT(b: boolean);'
  406.           'begin'
  407.           '   TRACE('#39'Assert Failed!'#39');'
  408.           '   raise Exception.Create('#39'Assert Failed!'#39');'
  409.           'end;'
  410.           '{$ELSE}'
  411.           'procedure ASSERT(b: boolean);'
  412.           'begin'
  413.           '   TRACE('#39'Assert Failed!'#39');'
  414.           '   raise Exception.Create('#39'Assert Failed!'#39');'
  415.           'end;'
  416.           '{$ENDIF}'
  417.           ''
  418.           'procedure TDebugForm.AddLine(s: string);'
  419.           'begin'
  420.           '   while Memo1.Lines.Count >= MaxLines do'
  421.           '      Memo1.Lines.Delete(0);'
  422.           '   Memo1.Lines.Add(s);'
  423.           'end;'
  424.           ''
  425.           'procedure TDebugForm.FormCreate(Sender: TObject);'
  426.           'begin'
  427.           '   Show;'
  428.           'end;'
  429.           ''
  430.           'procedure TDebugForm.Exit1Click(Sender: TObject);'
  431.           'begin'
  432.           '   Close;'
  433.           'end;'
  434.           ''
  435.           'procedure TDebugForm.StayOnTop1Click(Sender: TObject);'
  436.           'begin'
  437.           '   StayOnTop1.Checked := NOT StayOnTop1.Checked;'
  438.           ''
  439.           '   if StayOnTop1.Checked then'
  440.           '      FormStyle := fsStayOnTop'
  441.           '   else'
  442.           '      FormStyle := fsNormal;'
  443.           'end;'
  444.           ''
  445.           'procedure TDebugForm.Clear1Click(Sender: TObject);'
  446.           'begin'
  447.           '   Memo1.Lines.Clear;'
  448.           'end;'
  449.           ''
  450.           'procedure TDebugForm.Font1Click(Sender: TObject);'
  451.           'begin'
  452.           '   if FontDialog1.Execute then'
  453.           '      Memo1.Font := FontDialog1.Font;'
  454.           'end;'
  455.           ''
  456.           'begin'
  457.           '{$IFDEF DEBUG}'
  458.           '   DebugForm := TDebugForm.Create(NIL);'
  459.           '{$ENDIF}'
  460.           'end.'
  461.           ''
  462.           '{ DEBUG.DFM }'
  463.           ''
  464.           'object DebugForm: TDebugForm'
  465.           '  Left = 275'
  466.           '  Top = 127'
  467.           '  Width = 435'
  468.           '  Height = 300'
  469.           '  Caption = '#39'Debug Form'#39
  470.           '  Font.Color = clWindowText'
  471.           '  Font.Height = -13'
  472.           '  Font.Name = '#39'System'#39
  473.           '  Font.Style = []'
  474.           '  Menu = MainMenu1'
  475.           '  PixelsPerInch = 96'
  476.           '  OnCreate = FormCreate'
  477.           '  TextHeight = 16'
  478.           '  object Memo1: TMemo'
  479.           '    Left = 0'
  480.           '    Top = 0'
  481.           '    Width = 427'
  482.           '    Height = 254'
  483.           '    Align = alClient'
  484.           '    BorderStyle = bsNone'
  485.           '    Font.Color = clBlack'
  486.           '    Font.Height = -11'
  487.           '    Font.Name = '#39'Arial'#39
  488.           '    Font.Style = []'
  489.           '    ParentFont = False'
  490.           '    ScrollBars = ssVertical'
  491.           '    TabOrder = 0'
  492.           '  end'
  493.           '  object MainMenu1: TMainMenu'
  494.           '    Left = 40'
  495.           '    Top = 48'
  496.           '    object File1: TMenuItem'
  497.           '      Caption = '#39'&File'#39
  498.           '      object Clear1: TMenuItem'
  499.           '        Caption = '#39'&Clear'#39
  500.           '        OnClick = Clear1Click'
  501.           '      end'
  502.           '      object Font1: TMenuItem'
  503.           '        Caption = '#39'&Font...'#39
  504.           '        OnClick = Font1Click'
  505.           '      end'
  506.           '      object N2: TMenuItem'
  507.           '        Caption = '#39'-'#39
  508.           '      end'
  509.           '      object StayOnTop1: TMenuItem'
  510.           '        Caption = '#39'Stay On Top'#39
  511.           '        OnClick = StayOnTop1Click'
  512.           '      end'
  513.           '      object N1: TMenuItem'
  514.           '        Caption = '#39'-'#39
  515.           '      end'
  516.           '      object Exit1: TMenuItem'
  517.           '        Caption = '#39'E&xit'#39
  518.           '        OnClick = Exit1Click'
  519.           '      end'
  520.           '    end'
  521.           '  end'
  522.           '  object FontDialog1: TFontDialog'
  523.           '    Font.Color = clWindowText'
  524.           '    Font.Height = -13'
  525.           '    Font.Name = '#39'System'#39
  526.           '    Font.Style = []'
  527.           '    MinFontSize = 0'
  528.           '    MaxFontSize = 0'
  529.           '    Left = 80'
  530.           '    Top = 48'
  531.           '  end'
  532.           'end')
  533.         ParentFont = False
  534.         ScrollBars = ssBoth
  535.         TabOrder = 3
  536.         WordWrap = False
  537.       end
  538.       object LoadTextBut: TButton
  539.         Left = 15
  540.         Top = 98
  541.         Width = 89
  542.         Height = 33
  543.         Caption = '&Load Text'
  544.         TabOrder = 0
  545.         OnClick = LoadTextButClick
  546.       end
  547.       object FontBut: TButton
  548.         Left = 119
  549.         Top = 98
  550.         Width = 89
  551.         Height = 33
  552.         Caption = '&Font'
  553.         TabOrder = 1
  554.         OnClick = FontButClick
  555.       end
  556.       object StartPageEdit: TMaskEdit
  557.         Left = 296
  558.         Top = 108
  559.         Width = 33
  560.         Height = 20
  561.         EditMask = '0;1;_'
  562.         MaxLength = 1
  563.         TabOrder = 2
  564.         Text = '1'
  565.       end
  566.     end
  567.   end
  568.   object PrinterSetupDialog1: TPrinterSetupDialog
  569.     Left = 448
  570.     Top = 48
  571.   end
  572.   object FontDialog1: TFontDialog
  573.     Font.Color = clBlack
  574.     Font.Height = -16
  575.     Font.Name = 'Arial'
  576.     Font.Style = []
  577.     Device = fdPrinter
  578.     MinFontSize = 0
  579.     MaxFontSize = 0
  580.     Left = 488
  581.     Top = 48
  582.   end
  583.   object MainMenu1: TMainMenu
  584.     Left = 416
  585.     Top = 48
  586.     object File1: TMenuItem
  587.       Caption = '&File'
  588.       object PrinterSetup1: TMenuItem
  589.         Caption = 'Printer &Setup'
  590.         OnClick = PrinterSetup1Click
  591.       end
  592.       object N1: TMenuItem
  593.         Caption = '-'
  594.       end
  595.       object Exit1: TMenuItem
  596.         Caption = 'E&xit'
  597.         OnClick = Exit1Click
  598.       end
  599.     end
  600.   end
  601.   object PrintPreview2: TPrintPreview
  602.     OnBeginPrint = PrintPreview2BeginPrint
  603.     OnPrintPage = PrintPreview2PrintPage
  604.     OnEndPrint = PrintPreview1EndPrint
  605.     Title = 'Print Preview - Table Example'
  606.     Left = 48
  607.     Top = 226
  608.   end
  609.   object FontDialog2: TFontDialog
  610.     Font.Color = clBlack
  611.     Font.Height = -16
  612.     Font.Name = 'Times New Roman'
  613.     Font.Style = []
  614.     Device = fdPrinter
  615.     MinFontSize = 0
  616.     MaxFontSize = 0
  617.     Left = 520
  618.     Top = 48
  619.   end
  620.   object PrintPreview1: TPrintPreview
  621.     OnBeginPrint = PrintPreview1BeginPrint
  622.     OnPrintPage = PrintPreview1PrintPage
  623.     OnEndPrint = PrintPreview1EndPrint
  624.     GridWidth = 10
  625.     Title = 'Print Preview - Text Example'
  626.     ShowGrid = True
  627.     Left = 14
  628.     Top = 226
  629.   end
  630.   object OpenDialog1: TOpenDialog
  631.     DefaultExt = 'bmp'
  632.     Filter = 'Bitmap Files (*.bmp)|*.bmp|All Files (*.*)|*.*'
  633.     Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
  634.     Title = 'Open Bitmap'
  635.     Left = 375
  636.     Top = 275
  637.   end
  638.   object PrintPreview3: TPrintPreview
  639.     OnBeginPrint = PrintPreview3BeginPrint
  640.     OnPrintPage = PrintPreview3PrintPage
  641.     OnEndPrint = PrintPreview1EndPrint
  642.     GridColor = clPurple
  643.     GridWidth = 5
  644.     Title = 'Print Preview - Graphics'
  645.     ShowGrid = True
  646.     Left = 117
  647.     Top = 226
  648.   end
  649.   object PrintPreview4: TPrintPreview
  650.     OnBeginPrint = PrintPreview4BeginPrint
  651.     OnPrintPage = PrintPreview4PrintPage
  652.     OnEndPrint = PrintPreview1EndPrint
  653.     Title = 'Print Preview'
  654.     Left = 83
  655.     Top = 226
  656.   end
  657.   object FontDialog3: TFontDialog
  658.     Font.Color = clBlack
  659.     Font.Height = -13
  660.     Font.Name = 'Courier New'
  661.     Font.Style = []
  662.     Device = fdPrinter
  663.     MinFontSize = 0
  664.     MaxFontSize = 0
  665.     Left = 407
  666.     Top = 274
  667.   end
  668.   object OpenDialog2: TOpenDialog
  669.     Filter = 'Text Files (*.txt)|*.txt|All Files (*.*)|*.*'
  670.     Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]
  671.     Title = 'Open a Text File'
  672.     Left = 439
  673.     Top = 274
  674.   end
  675. end
  676.